<template>
    <div class="container">
        <div class="content">
            <div>
                <h1 class="title">{{ props.title }}</h1>
                <p>{{ props.body }}</p>
                <RouterLink :to="{name:props.url}" class="link">点击了解详情</RouterLink>
            </div>
            <div>
                <img :src="props.imgsrc">
            </div>
        </div>
    </div>
</template>

<script lang="ts" setup name="">
    import router from '@/router';
    const props = defineProps({
        title:String,
        imgsrc:String,
        body:String,
        url:String
    })
</script>

<style scoped lang="scss">
     .container{
        width: 100%;
        height: 26vw;
        display: flex;
        justify-content: center;
        .content{
            position: relative;
            display: flex;
            justify-content: space-between;
            width: 100%;
            background-color: black;
            height: 26vw;
            border-radius: 2vw;
            .title{
                padding-top: 3vw;
                padding-left: 3vw;
                padding-bottom: 2vw;
                color: #fff;
            }
            p{
                color: white;
                font-size: 1vw;
                padding-left: 3vw;
                margin-bottom: 2vw;
            }
            .link{
                text-decoration: none;
                color: black;
                cursor: pointer;
                font-size: 1vw;
                margin-top: 2vw;
                margin-left: 3vw;
                border: 1px solid white;;
                border-radius: 0.2vw;
                background-color: white;
            }
            img{
                height: 26vw;
                width: 100%;
                border-radius: 2vw;
            }
        }
    }
</style>
